﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using EUTmvc.Models;
using EUTmvc.Utils;

namespace EUTmvc.Controllers
{
    public class FileController : Controller
    {
        //
        // GET: /File/

        public ActionResult Index()
        {
            return View();
        }

        [HttpPost]
        public string Index(FileClass model)
        {
            string s = "";
            if (Uploader.HasFile(model.file))
            {
                s = Uploader.SaveWord(model.file, "~/Uploads/file/");
            }
            return s;
        }

    }
}
